package com.halfsword.creativecraft.creativetab;

import com.halfsword.creativecraft.CreativeCraft;
import com.halfsword.creativecraft.block.BlockLoader;
import com.halfsword.creativecraft.item.ItemLoader;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;

import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.RegistryObject;

public class CreativeTabLoader {
    public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS =
            DeferredRegister.create(Registries.CREATIVE_MODE_TAB, CreativeCraft.MOD_ID);
    public static final RegistryObject<CreativeModeTab> TAB_CRAFT =CREATIVE_MODE_TABS.register("tab_craft",()-> CreativeModeTab.builder().icon(() -> new ItemStack(ItemLoader.GEMSPACE.get())).title(Component.translatable("creativetab.tab_craft"))
            .displayItems((itemDisplayParameters, output) -> {
                output.accept(ItemLoader.RAWSPACE.get());
                output.accept(ItemLoader.GEMSPACE.get());
                output.accept(ItemLoader.FUELSPACE.get());
                output.accept(ItemLoader.INGOT_TITANIUM.get());





            })
            .build());

    public static final RegistryObject<CreativeModeTab> TAB_ORE =CREATIVE_MODE_TABS.register("tab_ore",()-> CreativeModeTab.builder().icon(() -> new ItemStack(BlockLoader.ORE_SPACE.get())).title(Component.translatable("creativetab.tab_ore"))
            .displayItems((itemDisplayParameters, output) -> {

                output.accept(BlockLoader.ORE_SPACE.get());
                output.accept(BlockLoader.DEEPSLATE_ORE_SPACE.get());
                output.accept(BlockLoader.NETHER_ORE_SPACE.get());
                output.accept(BlockLoader.END_ORE_SPACE.get());
                output.accept(BlockLoader.BLOCK_SPACE.get());
                output.accept(BlockLoader.BLOCK_RAW_SPACE.get());
                output.accept(BlockLoader.BLOCK_SPACE_RESONANCE.get());
                output.accept(BlockLoader.BLOCK_TITANIUM.get());



            })
            .build());
    public static final RegistryObject<CreativeModeTab> TAB_ERROR =CREATIVE_MODE_TABS.register("tab_error",()-> CreativeModeTab.builder().icon(() -> new ItemStack(ItemLoader.NOTHING_SPAWN_EGG.get())).title(Component.translatable("creativetab.tab_error"))
            .displayItems((itemDisplayParameters, output) -> {

                output.accept(ItemLoader.NOTHING_SPAWN_EGG.get());




            })
            .build());
    public static final RegistryObject<CreativeModeTab> TAB_MACHINE =CREATIVE_MODE_TABS.register("tab_machine",()-> CreativeModeTab.builder().icon(() -> new ItemStack(BlockLoader.SPACE_SHARD_COLLECTOR_MACHINE.get())).title(Component.translatable("creativetab.tab_machine"))
            .displayItems((itemDisplayParameters, output) -> {

                output.accept(BlockLoader.SPACE_SHARD_COLLECTOR_MACHINE.get());
                output.accept(BlockLoader.STEAM_POWER_CRUSHER_MACHINE.get());




            })
            .build());
    public static final RegistryObject<CreativeModeTab> TAB_MACHINE_PARTNER =CREATIVE_MODE_TABS.register("tab_machine_partner",()-> CreativeModeTab.builder().icon(() -> new ItemStack(ItemLoader.LINKAGE_I.get())).title(Component.translatable("creativetab.tab_machine_partner"))
            .displayItems((itemDisplayParameters, output) -> {

                output.accept(ItemLoader.LINKAGE_I.get());
                output.accept(ItemLoader.CYLINDER_I.get());
                output.accept(ItemLoader.SMALL_GEAR_IRON.get());
                output.accept(ItemLoader.AXIS_I.get());
                output.accept(ItemLoader.PISTON_I.get());





            })
            .build());

    public static final RegistryObject<CreativeModeTab> TAB_FOOD =CREATIVE_MODE_TABS.register("tab_food",()-> CreativeModeTab.builder().icon(() -> new ItemStack(ItemLoader.BLUEBERRY.get())).title(Component.translatable("creativetab.tab_food"))
            .displayItems((itemDisplayParameters, output) -> {

                output.accept(ItemLoader.BLUEBERRY.get());
                output.accept(ItemLoader.BLUEBERRY_SEEDS.get());
                output.accept(ItemLoader.SORGHUM.get());
                output.accept(ItemLoader.SORGHUM_SEEDS.get());
                output.accept(BlockLoader.CALENDULA.get());






            })
            .build());
    public static final RegistryObject<CreativeModeTab> TAB_MUSIC =CREATIVE_MODE_TABS.register("tab_music",()-> CreativeModeTab.builder().icon(() -> new ItemStack(ItemLoader.CORNFIELD_CHASE_DISC.get())).title(Component.translatable("creativetab.tab_music"))
            .displayItems((itemDisplayParameters, output) -> {

                output.accept(ItemLoader.CORNFIELD_CHASE_DISC.get());
                output.accept(Items.MUSIC_DISC_5);
                output.accept(Items.MUSIC_DISC_11);
                output.accept(Items.MUSIC_DISC_CAT);
                output.accept(Items.MUSIC_DISC_WAIT);
                output.accept(Items.MUSIC_DISC_WARD);
                output.accept(Items.MUSIC_DISC_STAL);
                output.accept(Items.MUSIC_DISC_STRAD);
                output.accept(Items.MUSIC_DISC_13);
                output.accept(Items.MUSIC_DISC_CHIRP);
                output.accept(Items.MUSIC_DISC_FAR);
                output.accept(Items.MUSIC_DISC_PIGSTEP);
                output.accept(Items.MUSIC_DISC_OTHERSIDE);
                output.accept(Items.MUSIC_DISC_BLOCKS);
                output.accept(Items.MUSIC_DISC_MALL);
                output.accept(Items.MUSIC_DISC_RELIC);
                output.accept(Items.MUSIC_DISC_MELLOHI);













            })
            .build());
    public static final RegistryObject<CreativeModeTab> TAB_TOOL_WEAPON =CREATIVE_MODE_TABS.register("tab_toolandweapon",()-> CreativeModeTab.builder().icon(() -> new ItemStack(ItemLoader.SWORDSPACE.get())).title(Component.translatable("creativetab.tab_toolandweapon"))
            .displayItems((itemDisplayParameters, output) -> {

                output.accept(ItemLoader.SWORDSPACE.get());
                output.accept(ItemLoader.AXESPACE.get());
                output.accept(ItemLoader.PICKAXESPACE.get());
                output.accept(ItemLoader.SHOVELSPACE.get());
                output.accept(ItemLoader.HOESPACE.get());





                output.accept(ItemLoader.STAFFSPACE.get());
                output.accept(ItemLoader.SPACEDECECTOR.get());




            })
            .build());
    public static final RegistryObject<CreativeModeTab> TAB_NEW_ARMORS =CREATIVE_MODE_TABS.register("tab_new_armor",()-> CreativeModeTab.builder().icon(() -> new ItemStack(ItemLoader.CHESTPLATESPACE.get())).title(Component.translatable("creativetab.tab_new_armor"))
            .displayItems((itemDisplayParameters, output) -> {



                output.accept(ItemLoader.HELMETSPACE.get());
                output.accept(ItemLoader.CHESTPLATESPACE.get());
                output.accept(ItemLoader.LEGGINGSSPACE.get());
                output.accept(ItemLoader.BOOTSSPACE.get());

                output.accept(ItemLoader.HELMETENDER.get());
                output.accept(ItemLoader.CHESTPLATEENDER.get());
                output.accept(ItemLoader.LEGGINGSENDER.get());
                output.accept(ItemLoader.BOOTSENDER.get());








            })
            .build());
    public static final RegistryObject<CreativeModeTab> TAB_OTHER =CREATIVE_MODE_TABS.register("tab_other",()-> CreativeModeTab.builder().icon(() -> new ItemStack(BlockLoader.STAIRS_SPACE.get())).title(Component.translatable("creativetab.tab_other"))
            .displayItems((itemDisplayParameters, output) -> {


                output.accept(BlockLoader.STAIRS_SPACE.get());
                output.accept(BlockLoader.SLAB_SPACE.get());
                output.accept(BlockLoader.DOOR_SPACE.get());
                output.accept(BlockLoader.TRAPDOOR_SPACE.get());
                output.accept(BlockLoader.WALL_SPACE.get());
                output.accept(BlockLoader.BUTTON_SPACE.get());
                output.accept(BlockLoader.PRESSURE_PLATE_SPACE.get());
                output.accept(BlockLoader.FENCE_GATE_SPACE.get());
                output.accept(BlockLoader.FENCE_SPACE.get());





            })
            .build());

    public static void register(IEventBus eventBus) {
        CREATIVE_MODE_TABS.register(eventBus);
    }
}
